# 1 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"
;cpRINADEQUATE
;
;version: 4.0/ TS3.0 / 8/06/2011
;
;basic J-based SQDQ correlation experiment with refocussing and z-filter for pure in phase signals
;written by JOS and Len Mueller 2/18/2002 added Z-filter 7/12/2004
;updated and prepared for release by JOS 7/31/2011
;may require long experimetnal times for natural abundance samples
;Reference:
;A. Lesage, M. Bardet, and L. Emsley JACS 121, 10987 (1999)
;
;Avance III version
;parameters:
;d0 : incremented delay (2D) [0 usec]
;d1 : recycle delay
;d20 : =0.001s, delay for presaturation sequence
;l20 : =100, loop number for presaturation pulses
;p1 : X 90 degree pulse
;p2 : X 180 degree decoupling pulse during t1 CS evolution of Y nucleus
;p3 : H 90 degree pulse
;p31 : decoupling pulse for spinal64.13
;p15 : contact time; plw3 (rf-channel f3) and spw0 (rf-channel f2)
;pl1 : rf-power contact pulse on X
;pl11 : rf-power on X for 90 and 180 degree pulses
;pl12 : rf-power for 1H pi/2 pulse p3 and standard proton decoupling during J-evolution
;pl13 : rf=power for cw decoupling on 1H during acquisition
;pl14 : power for 1H pflit pulse, about 1MAS frequency
;sp0 : rf-power for proton contact pulse, 50 -20% ramped amplitude modulation
;spnam0 : file name for variable amplitude CP
;cpdprg1 : sequence used for decoupling (spinal64.13)
;cpdprg2 : sequence used for decoupling (spinal64, tppm15, cw, etc.)
;pcpd2 : pulse length in decoupling sequence
;cnst31 : MAS spinning speed 
;NS : 64 * n, better to be 128 * n               
;l5 : rp's for J refocusing dtau1= 3.5 - 5.5 ms for 45 -70 Hz coupling
;l8 : rp's for z-filter short for natural abundance 2 - 5 ms for labeled systems
;in0 : = inf1 -> SWH in F1 = n*rotation rate
;FnMode : States-TPPI
;DIGMOD : digital
;
;$CLASS=Solids
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=


# 1 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/trigg.incl" 1
;version (13/08/19)
# 3 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/trigg.incl"
;$COMMENT=definition of external trigger output, conn I pin 1
;$CLASS=Solids INCL


# 12 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/trigg.incl"
;$Id: 6u setnmr3|28 \n 4u  setnmr3^28.incl,v 1.1.18.4 2013/08/29 14:05:47 ber Exp $
# 48 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx" 2


# 51 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"
"d11=30m"


"p2=2*p1"
# 56 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"
define delay dtau1
"dtau1=((1s/cnst31)*l5-2*p1)"

; define delay dtau3
; "dtau3=((1s/cnst31)*l7-2*p1)"

define delay dtauz
"dtauz=((1s/cnst31)*l8-p1)"
define pulse pfilt
"pfilt=dtauz"
"d0=0"
"in0=inf1"
# 1 "mc_line 69 file C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx exp. def. part of mc cmd. before ze"
define delay MCWRK
define delay MCREST
define loopcounter ST1CNT
"ST1CNT = td1 / 2"
"MCREST = 10m - 10m"
"MCWRK = 0.200000*10m"

    dccorr
# 69 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"
# 69 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"
1 ze
# 1 "mc_line 69 file C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx exp. def. of mc cmd. after ze"
# 70 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"

# 1 "mc_line 71 file C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx exp. start label for mc cmd."
2 MCWRK  * 3 do:f2
LBLSTS1, MCWRK 
LBLF1, MCWRK 
  MCREST
# 72 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"
# 1 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/p15_prot.incl" 1
;p15_prot.incl
;avance-version (13/01/29)
;Test the rf on-time and duty cycle
;protect against too long contact time
;Test the rf on-time and duty cycle 
;
;$CLASS=Solids INCL
;$COMMENT=protect against too long contact time

# 11 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/p15_prot.incl"
1m
if "p15 < 10.1m" goto Passp15
2u
print "contact time exceeds 10msec limit!"
goto HaltAcqu
Passp15, 1m


# 20 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/p15_prot.incl"
;$Id: p15_prot.incl,v 1.2.18.4 2013/01/29 15:40:51 ber Exp $
# 72 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx" 2

  ;make sure p15 does not exceed 10 msec 
  ;let supervisor change this pulseprogram if 
  ;more is needed
# 1 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/aq_prot.incl" 1
;aq_prot.incl
;avance-version (13/01/28)
;Test the rf on-time and duty cycle
;protect against too long acquisition time

;$CLASS=Solids INCL
;$COMMENT=protect against too long acquisition time
# 9 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/aq_prot.incl"
1m
if "aq < 50.1m" goto Passaq
2u 
print "acquisition time exceeds 50m limit!"
goto HaltAcqu
Passaq, 1m

;$Id: aq_prot.incl,v 1.2.18.4 2013/01/28 17:40:19 ber Exp $
# 76 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx" 2

  ;allows max. 50 msec acquisition time, supervisor
  ;may change  to max. 1s at less than 5 % duty cycle
  ;and reduced decoupling field
# 1 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/rot_prot.incl" 1
;rot_prot.incl
;avance-version (13/01/29)
;Test the rf on-time and duty cycle
;protect against misset cnst31, rotation speed below 1000 Hz
;
;$CLASS=Solids INCL
;$COMMENT=protect against misset cnst31, rotation speed below 1000 Hz
# 10 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/rot_prot.incl"
1m
if "d31 < 1m" goto Passrot
2u
print "rotation period too long, cnst31 misset to less than 1000 Hz!"
goto HaltAcqu
Passrot, 1m


# 19 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/rot_prot.incl"
;$Id: rot_prot.incl,v 1.2.18.4 2013/01/29 15:40:51 ber Exp $
# 80 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx" 2


3 d20 pl12:f2
  (p3 pl12 ph0):f2
  lo to 3 times l20
# 86 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"
4 d1 pl12:f2
	6u setnmr3|28 \n 4u  setnmr3^28

  (p3 ph1):f2                            ;(p1 ph4):f1 
  (p15 pl1 ph2):f1 (p15:sp0 ph3):f2
  dtau1  cpds2:f2  pl11:f1
  (p2 ph5):f1
  dtau1 

  (p1 ph6):f1
# 97 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"
  d0

  (p1 ph9):f1
  dtau1                                      ;dtau3 
  (p2 ph10):f1
  dtau1                                      ;dtau3

  (p1 ph15):f1 (1u do):f2
  (pfilt ph3 pl14):f2
  
  (p1 ph16):f1 (1u cpds1):f2 
# 109 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"
  go=2 ph31 
  3m do:f2
# 1 "mc_line 111 file C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx exp. mc cmd. in line"
  MCWRK  wr #0 if #0 zd ip2  MCWRK  ip5  MCWRK  ip6
  lo to LBLSTS1 times 2
  MCWRK id0
  lo to LBLF1 times ST1CNT
  MCWRK
# 113 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"

HaltAcqu, 1m
exit

ph0=0
ph1={1}*64 {3}*64
ph3=0
ph2=(8) 0 2 4 6 
;ph4=1 2 3 0
ph5=(8) 0 2 4 6 2 4 6 0 4 6 0 2 6 0 2 4
ph6=(8) 2 4 6 0
# 125 "C:/Bruker/TopSpin3.2/exp/stan/nmr/lists/pp/user/presat_cpRINADEQUATE_zfilter.dx"
ph9=0  
ph10={1}*16 {2}*16 {3}*16 {0}*16 
ph15=0   
ph16=2  

ph31= {{{{{0 2 0 2}^2}*2}^2}*2}^2

